//
//  ListTableViewCell.m
//  ShangAPP
//
//  Created by 徐番茄丶 on 16/1/22.
//  Copyright © 2016年 wangdao. All rights reserved.
//

#import "ListTableViewCell.h"
#import "MyTools.h"
@implementation ListTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self viewCreate];
    }
    return self;
}

-(void)viewCreate{
    _timelab = [[UILabel alloc]initWithFrame:CGRectMake(5 * MYWIDTH, 5, 80 * MYWIDTH, 40)];
    _timelab.numberOfLines = 0;
    _timelab.font = [UIFont systemFontOfSize:13 * MYWIDTH];
    _timelab.textAlignment = NSTextAlignmentCenter;
    _timelab.textColor = UIColorFromRGB(0x666666);
    [self addSubview:_timelab];
    
    _moneylab = [[UILabel alloc]initWithFrame:CGRectMake(90 * MYWIDTH, 10, 80 * MYWIDTH, 30)];
    _moneylab.font = [UIFont systemFontOfSize:13 * MYWIDTH];
    _moneylab.textAlignment = NSTextAlignmentCenter;
    _moneylab.textColor = UIColorFromRGB(0xe51c23);
    [self addSubview:_moneylab];
    
    _typelab = [[UILabel alloc]initWithFrame:CGRectMake(175 * MYWIDTH, 18, 30 * MYWIDTH, 16)];
    _typelab.font = [UIFont systemFontOfSize:10 * MYWIDTH];
    _typelab.backgroundColor = UIColorFromRGB(0x03a9f4);
    _typelab.layer.cornerRadius = 5;
    _typelab.layer.masksToBounds = YES;
    _typelab.textColor = [UIColor whiteColor];
    _typelab.textAlignment=NSTextAlignmentCenter;
    [self addSubview:_typelab];
    
    _numlab = [[UILabel alloc]initWithFrame:CGRectMake(210 * MYWIDTH, 10, 85 * MYWIDTH, 30)];
    _numlab.font = [UIFont systemFontOfSize:12 * MYWIDTH];
    _numlab.textColor = UIColorFromRGB(0x999999);
    _numlab.textAlignment =NSTextAlignmentCenter;
    [self addSubview:_numlab];
    
    _statelab = [[UILabel alloc]initWithFrame:CGRectMake(295 * MYWIDTH, 10, WIDTH - 295 * MYWIDTH, 30)];
    _statelab.font = [UIFont systemFontOfSize:13 * MYWIDTH];
    _statelab.textAlignment = NSTextAlignmentCenter;
    _statelab.textColor = UIColorFromRGB(0xff9800);
    [self addSubview:_statelab];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
